#include <graphics.h>
#include <iostream>

constexpr int side = 60;

class Cell
{
public:
	Cell() = default;

	Cell(int line, int row) :
		line(line), row(row)
	{
		this->selected = false;
		this->color = BLACK;
	}

	void draw() {
		setlinecolor(BLACK);
		setfillcolor(BROWN);
		if (selected)
			setfillcolor(WHITE);
		fillrectangle(row * side, (line + 2) * side, (row + 1) * side, (line + 3) * side);
		if (color != BLACK) {
			setfillcolor(color);
			fillcircle(row * side + side / 2, (line + 2) * side + side / 2, side / 4);
		}
	}

	void setColor(COLORREF color) {
		this->color = color;
	}

	COLORREF getColor() {
		return this->color;
	}

	bool isSelect() { return this->selected; }

	void select(bool state) {
		this->selected = state;
	}

	//static int side;

private:
	int line;
	int row;
	bool selected;
	COLORREF color{};
};

//int Cell::side = 40;
